package com.jqsoft.launcher.activity.setting;

import android.view.View;
import android.view.View.OnClickListener;
import android.widget.RelativeLayout;

import com.jqsoft.launcher.activity.JQActivity;
import com.jqsoft.launcher.common.BphsConstants;
import com.jqsoft.launcher.R;
import com.jqsoft.launcher.util.MessageTools;

public class LiXianActivity extends JQActivity implements OnClickListener{
	private final String tag = "LiXianActivity";
	private RelativeLayout update_db_rl,tijiao_info_rl,xindian_rl,yiliaoservice_rl;
	@Override
	protected int getContentLayout() {
		
		return R.layout.lixian_layout;
	}

	@Override
	protected void initGui() {
		update_db_rl=(RelativeLayout) findViewById(R.id.update_db_rl);
		tijiao_info_rl=(RelativeLayout) findViewById(R.id.tijiao_info_rl);
		xindian_rl=(RelativeLayout) findViewById(R.id.xindian_rl);
		yiliaoservice_rl=(RelativeLayout) findViewById(R.id.yiliaoservice_rl);
	}

	@Override
	protected void initAction() {
		setGoBack();
		update_db_rl.setOnClickListener(this);
		tijiao_info_rl.setOnClickListener(this);
		xindian_rl.setOnClickListener(this);
		yiliaoservice_rl.setOnClickListener(this);
	}

	@Override
	protected void initData() {
		setTitle("离线设置");

	}
	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.title_bar_left_button:
			toHome();
			return;
		case R.id.update_db_rl:
			if (!BphsConstants.isNetAvailable) {
				MessageTools.showDialogOk(ctx, "此功能暂不支持离线操作，请联网操作！");
				return;
			}
			toNoFinish(UpdateDBActivity.class);
			return;	
		case R.id.tijiao_info_rl:
			toNoFinish(SubmitInfoListActivity2.class);
			return;
		case R.id.xindian_rl:
			toNoFinish(SubmitXianDianListActivity.class);
			return;
		case R.id.yiliaoservice_rl:
			toNoFinish(SubmitYiLiaoServiceListActivity.class);
			return;
		}
		
	}
}
